import request from '../utils/request'  // 导入的是直接可调用的函数
export default{
  //获取藏品详情
  getCollectionDetail(name){
    return request({
      url:'/collection/getOneCollection/'+name,
      method:'get'
    })
  },
  //判断用户是否点赞
  isLikeCollection(collectionId){
    return request({
      url:'/collection/isLikeCollection/'+collectionId,
      method:'get'
    })
  },
  //进行点赞操作
  likeCollection(collectionId){
    return request({
      url:'/collection/likeCollection/'+collectionId,
      method:'post'
    })
  },
  //进行取消点赞操作
  cancelLikeCollection(collectionId){
    return request({
      url:'/collection/cancelLikeCollection/'+collectionId,
      method:'post'
    })
  }
}